<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ace="http://www.icefaces.org/icefaces/components"
      xmlns:ice="http://www.icesoft.com/icefaces/component"
      xmlns:icecore="http://www.icefaces.org/icefaces/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
        >
<h:head>
    <title>ICE Faces tree</title>
</h:head>

<h:body bgcolor="white">
    <h:form>
        <h:commandButton value="Regenerate"
                         actionListener="#{tree.refreshTree}"/>
        <br/>

        <ice:tree value="#{tree.model}"
                  var="node"
                  hideRootNode="false"
                  hideNavigation="false">
            <ice:treeNode>
                <f:facet name="icon">
                    <h:graphicImage value="#{node.userObject.icon}" alt="#{node.userObject.tooltip}"/>
                </f:facet>
                <f:facet name="content">
                    #{node.userObject.text}
                </f:facet>
            </ice:treeNode>
        </ice:tree>
    </h:form>
</h:body>

</html>